<?php

namespace app\index\service;

use app\index\model\UM as UM;
use ary\Ary;

/**
 *
 * Class SourceRecordingService
 * @package app\index\service
 */
class SourceRecordingService
{
    private Ary $ary;

    public function __construct(Ary $ary)
    {
        $this->ary = $ary;
    }

    /**
     * 案如云-录音列表
     * @param UM $user
     * @param $params
     * @return mixed
     */
    public function index(UM $user, $params)
    {
        ary_page($params);

        $params['user_id'] = $user->id;

        $response = $this->ary->getRecordingList($params);

        $decodeContents = $response->getDecodeContents();

        return $decodeContents['data'];
    }

    public function indexOfConvert(UM $user, $params)
    {
        ary_page($params);

        $params['user_id'] = $user->id;

        $response = $this->ary->getRecordingConvertRecordList($params);

        $decodeContents = $response->getDecodeContents();

        return $decodeContents['data'];
    }
}
